<?php if (isset($story)) { var_dump($return); ?>



<div class="row-fluid" >
        
        <div class="span12">
            
                <h1><?php echo '<h1>' ;

                    echo $this->Html->link(h($project['Project']['name']),'../projects/view/'.$project['Project']['id']);
                ?>

                </h1>
       
        </div>
    </div><br/><br/>

    
<div class="tabbable tabs-left">
              <ul class="nav nav-tabs">
                <li class="active"><a href="#general" data-toggle="tab">General</a></li>
                <li class=""><a href="#tasks" data-toggle="tab">Tareas</a></li>
                <li class=""><a href="#comments" data-toggle="tab">Comentarios</a></li>
              </ul>
              <div class="tab-content">
                <div class="tab-pane active" id="general">
                     
                    <?php echo $this->element('stories/viewStory',array('edit'=>true));?>
                    <?php
                    $options = array(
                        'label' => 'Guardar','class' => 'btn'
                    );
                    echo $this->Form->end($options);
                    ?>
                </div>
                <div class="tab-pane" id="tasks">
                  <?php echo $this->element('stories/addTask');
                  echo $this->element('stories/taskList');
                 // var_dump($story['Task']);
                          ?>
                </div>
                <div class="tab-pane" id="comments">
                  <?php echo $this->element('stories/addComment');
                  echo $this->element('stories/commentList');
                 // var_dump($story['Task']);
                          ?>
                </div>
              </div>
            </div>
 


<?php } else {?>
    <br/>
    <div class="alert alert-info">
        Error de acceso.
    </div>
<?php }?>

<?php //


/*

<h1>Edit UserStory:</h1>
<?php
//    if (isset($ind)){
//        $url=array('url' => array('action' => 'edit','ind'=>$ind));
//    }
//    else{
//        $url=array('url' => array('action' => 'edit'));
//    }
    $url= $this->here;
    echo $this->Form->create('Story',array($url,'class'=>'form-horizontal') );
    
    $optionsLabel = array('class' => 'control-label','text'=>'Resumen');
    $options = array('div' => 'control-group','label'=>$optionsLabel,'class'=>'controls');
    echo $this->Form->input('summary',$options);
    
    $optionsLabel2 = array('class' => 'control-label','text'=>'Detalle');
    $options2 = array('div' => 'control-group','label'=>$optionsLabel2,'class'=>'controls','rows' => '3');
    echo $this->Form->input('detail', $options2);
    
    $options3 = array('0' => '?', '1' => '1', '2' => '2', '3' => '3', '5' => '5', '8' => '8', '13' => '13', '20' => '20', '40' => '40', '100' => '100' , '1000' => 'Infinito');
    $attributes = array('legend'=>false,'separator' => '</td><td>'); ?>
    <div class="control-group">
    <label class="control-label">Estimación</label>    
    <table style="margin-left: 20px; display: inline-block;  margin-bottom: 0; width: 300px;">
        <tr>
            <td>
            <?php  echo $this->Form->radio('points', $options3, $attributes);?> 
            </td>
        </tr>
    </table>
    </div>
    
    <?php 
        echo $this->Form->input('id', array('type' => 'hidden'));
        echo $this->Form->end('Save'); 
    */
    ?>